<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <g:set var="entityName" value="${message(code: 'estate.label', default: 'Estate')}" />
    <title>小区预警</title>
    <style>
    .contact-stat{
        padding: 8px 0px;
        text-align: center;
    }
    .contact-stat span{
        font-size: 13px;
        color: #88898c;
        margin-bottom: 10px;
    }
    .contact-stat strong{
        font-size: 13px;
        word-wrap: break-word;
    }
    .nav-tabs{
        border-bottom: none;
    }
    .hpanel > .panel-footer, .hpanel > .panel-section{
        background: #f9f9f9;
    }

    .newFontSize{
        font-size: 12px;
    }
    table>tbody>tr>td, table>tbody>tr>th,.table>tfoot>tr>td, table>tfoot>tr>th, table>thead>tr>td, table>thead>tr>th{
        padding: 8px;
        line-height: 1.42857143;
    }
    .tdColor{
        color: red !important;
    }

    </style>
</head>
<body class="fixed-navbar fixed-sidebar">

<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>预警</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                小区预警
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <g:form method="POST" action="riskWarningCommunity" class="form-horizontal" role="form" id="form">
            <div class="hpanel hblue">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <button class="btn btn-primary btn-xs" type="submit" id="searchBtn"><i class="fa fa-search"></i> 查询</button>
                        <button class="btn btn-warning2 btn-xs" type="button" id="resetBtn">
                            <i class="fa fa-times"></i> 重置</button>
                    </div>
                    查询
                </div>
                 <div class="panel-body seach-group" id="bug1">
                     <div class="row">
                        <div class="form-group col-sm-3">
                            <label  class="col-sm-3 control-label">预警编号</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="serialNumber" id="serialNumber" value="${params?.serialNumber}" placeholder="请输入预警编号">
                            </div>
                        </div>
                        <div class="form-group col-sm-3">
                            <label  class="col-sm-3 control-label">小区名称</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="communityName" id="communityName" value="${params?.communityName}" placeholder="请输入小区名称">
                            </div>
                        </div>
                         <div class="form-group col-sm-3">
                            <label  class="col-sm-3 control-label">小区地址</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="address" id="address" value="${params?.address}" placeholder="请输入小区地址">
                            </div>
                        </div>
                    </div>
                </div>
            </g:form>
        </div>
    </div>

    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                小区预警
            </div>
            <div class="panel-body no-padding">
                <div class="table-responsive">
                    <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" id="estateTable">
                        <thead>
                        <tr>
                            <g:sortableColumn property="serialNumber" title="预警编号" class="text-center" params="${params}"/>
                            <g:sortableColumn property="communityName" title="小区名称" class="text-center" params="${params}"/>
                            <g:sortableColumn property="address" title="小区地址" class="text-center" params="${params}"/>
                            <g:sortableColumn property="coveringArea" title="占地面积(㎡)" class="text-center" params="${params}"/>
                            <g:sortableColumn property="buildArea" title="总建筑面积(㎡)" class="text-center tdColor" params="${params}"/>
                            <g:sortableColumn property="totalBuildingCount" title="总楼栋数" class=" text-center tdColor" params="${params}"/>
                            <g:sortableColumn property="totalHouseHoldCount" title="总户数" class=" text-center tdColor" params="${params}"/>
                            <g:sortableColumn property="residentialType" title="建筑形式" class="text-center tdColor" params="${params}"/>
                            <g:sortableColumn property="buildYear" title="建成年份" class="text-center tdColor" params="${params}"/>
                            <g:sortableColumn property="communityScore" title="楼盘风险评分" class="text-center tdColor" params="${params}"/>
                            <g:sortableColumn property="communityCoverage" title="小区占比覆盖率" class="text-center tdColor" params="${params}"/>
                            <g:sortableColumn property="concentrationRatio" title="小区押品集中度" class="text-center tdColor" params="${params}"/>
                            <g:sortableColumn property="workflow" title="工作流" class="text-center tdColor" params="${params}"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${riskWarningList}">
                        <tr>
                            <td><g:link style="color: #3498DB" action="riskWarningCommunityShow" id="${it?.id}" class="firstTd">${it?.serialNumber?it?.serialNumber:'-'}</g:link></td>
                            <td>${it?.community?.communityName ?: '-'}</td>
                            <td>${it?.community?.address ?: '-'}</td>
                            <td>${it?.community?.coveringArea ?: '-'}</td>
                            <td>${it?.community?.buildArea ?: '-'}</td>
                            <td>${it?.community?.totalBuildingCount ?: '-'}</td>
                            <td>${it?.community?.totalHouseHoldCount ?: '-'}</td>
                            <td>${it?.community?.residentialType ?: '-'}</td>
                            <td>${it?.community?.buildYear ?: '-'}</td>
                            <td>${it?.community?.communityScore ?: '-'}</td>
                            <td>${it?.community?.communityCoverage ?: '-'}</td>
                            <td>${it?.community?.concentrationRatio ?: '-'}</td>
                            <td>${it?.workflow?.name ?: '-'}</td>
                        </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="panel-footer">
                <div class="pagination">
                    <g:paginate action="riskWarningCommunity" total="${riskWarningCount ?: 0}" params="${params}"/>
                </div>
            </div>
        </div>
    </div>

</div>

<script>
    //条件重置
    $("#resetBtn").click(function () {
        $("#serialNumber").val("");
        $("#communityName").val("");
        $("#address").val("");
    });
</script>
</body>
</html>
